<template>
    <div class="space_release">
        <div class="header">
            <el-breadcrumb separator-class="el-icon-arrow-right">
                <el-breadcrumb-item :to="{ path: '/act' }">活动管理</el-breadcrumb-item>
                <el-breadcrumb-item>活动发布</el-breadcrumb-item>
            </el-breadcrumb>
        </div>
        <!-- 活动类型、活动主题 -->
        <div style="display:flex;">
            <div class="upload">
                <div class="up_distance">活动类型：</div>
                <el-input v-model="input" style="width:180px" placeholder="请填写名称"></el-input>
            </div>
            <div class="upload">
                <div class="up_distance">活动主题：</div>
                <el-input v-model="input" style="width:290px" placeholder="请填写名称"></el-input>
            </div>
        </div>
        <!-- 活动时间 -->
        <div class="upload">
            <div class="up_distance">活动时间：</div>
            <el-date-picker
                v-model="value1"
                type="datetimerange"
                range-separator="至"
                start-placeholder="开始日期"
                end-placeholder="结束日期">
            </el-date-picker>
            <el-button style="margin-left:100px;" type="primary" round><i class="fa fa-plus-square"></i>&nbsp;添加场次</el-button>
        </div>
        <!-- 空间费用 -->
        <div class="upload">
            <div class="up_distance">空间费用：</div>
            <div style="display:flex;">
                <div style="position:relative;" @click="pay_one">
                    <div :class="pay_status == 0?'pay show_pay': 'pay'">免费</div>
                    <img v-show="pay_status == 0" style="position:absolute;bottom:0;right:0;" src="./../../assets/img/xz.png" alt="">
                </div>
                <div style="position:relative;margin-left:50px;" @click="pay_two">
                    <div :class="pay_status == 1?'pay show_pay': 'pay'">收费</div>
                    <img v-show="pay_status == 1" style="position:absolute;bottom:0;right:0;" src="./../../assets/img/xz.png" alt="">
                </div>
            </div>
        </div>
        <!-- 票价 -->
        <div class="upload" v-if="pay_status == 1">
            <div class="up_distance">票价：</div>
            <div style="width:316px;background:#ddd;padding:30px 50px 30px 20px;border-radius: 4px;">
                <div>
                    <el-input v-model="input" class="registration_form" style="width:316px" placeholder="在线支付"></el-input>
                    <el-input v-model="input" class="registration_form" style="width:316px" placeholder="现场AA"></el-input>
                </div>
                <div class="continue_to_add">继续添加</div>
            </div>
        </div>
        <!-- 报名表单 -->
        <div class="upload">
            <div class="up_distance">报名表单：</div>
            <div style="width:316px;background:#ddd;padding:30px 50px 30px 20px;border-radius: 4px;">
                <div>
                    <el-input v-model="input" class="registration_form" style="width:316px" placeholder="姓名"></el-input>
                    <el-input v-model="input" class="registration_form" style="width:316px" placeholder="手机号"></el-input>
                    <el-input v-model="input" class="registration_form" style="width:316px" placeholder="微信号"></el-input>
                    <el-input v-model="input" class="registration_form" style="width:316px" placeholder="活动人数"></el-input>
                </div>
                <div class="continue_to_add">继续添加</div>
            </div>
        </div>
        <!-- 活动地址 -->
        <div class="upload">
            <div class="up_distance">活动地址：</div>
            <el-input v-model="input" style="width:386px" placeholder="请填写名称"></el-input>
        </div>
        <!-- 标记活动地点 -->
        <div class="" style="width:386px;height:120px;border:1px solid red;margin:10px 0 40px 30px;">
            <img src="./../../assets/img/location.png" alt="">
        </div>

        <!-- 活动海报 -->
        <div class="upload">
            <div class="up_distance">活动海报：</div>
            <div style="display:flex;">
                <div class="up-litter">
                    <!-- 左 -->
                    <div class="up-left">
                        <upload></upload> 
                    </div>
                    <!-- 右 -->
                    <div class="up-notice">
                        <div>支持 jpg 格式，可上传多张图</div>
                        <div>图片尺寸最佳为414*550像素，最多可上传6张</div>
                    </div>
                </div>
            </div>
            <!-- <upload :uploadType="'head'" :imgWidth="'85px'" :imgHeight="'104px'" :imgUrl="imgUrl" @upload="getImgUrl"></upload> -->
        </div>
        <!-- 活动召集 -->
        <div class="upload">
            <div class="up_distance">活动召集：</div>
            <el-input type="textarea" style="width:386px" :rows="8" placeholder="请输入" v-model="textarea"> </el-input>
        </div>
        <!-- 活动流程 -->
        <div class="upload">
            <div class="up_distance">活动流程：</div>
            <el-steps :active="active" space="230px"  finish-status="success">
                <el-step title="集合时间和地点" ></el-step>
                <el-step title="活动节奏"></el-step>
                <el-step title="活动结束/安排下半场"></el-step>
            </el-steps>
            <div>
                <el-input type="textarea" style="width:126px" :rows="8" placeholder="请输入" v-model="textarea"> </el-input>
                <el-input type="textarea" style="width:126px;margin-left:100px;" :rows="8" placeholder="请输入" v-model="textarea"> </el-input>
                <el-input type="textarea" style="width:126px;margin-left:100px;" :rows="8" placeholder="请输入" v-model="textarea"> </el-input>
            </div>
            <el-button style="margin-top: 12px;" @click="next">下一步</el-button>
        </div>

        <div style="border:1px solid #F1F1F1;margin:30px;"></div>
        <!-- 按钮组 -->
        <div class="upload up_button">
            <el-button type="primary" round>预览</el-button>
            <el-button type="primary" round>发布</el-button>
            <el-button type="info" round>取消</el-button>
        </div>
    </div>
</template>
<script>
import upload from '@/components/upload/upload'
export default {
    data (){
        return {
            active:0,
            pay_status:0,
            value1: [new Date(2016, 9, 10, 8, 40), new Date(2016, 9, 10, 9, 40)],
            img:'https://mirror-gold-cdn.xitu.io/16943f9b66c21b35716?imageView2/1/w/100/h/100/q/85/format/webp/interlace/1'
        }
    },
    methods:{
        pay_one() {
            console.log('pay');
            this.pay_status = 0;
        },
        pay_two() {
            this.pay_status = 1;
        },
        next() {
        if (this.active++ > 2) this.active = 0;
      }
    },
    components:{
        upload
    },
     mounted() {
        // 获取参数
        console.log(this.$route.query.id)
    }
}
</script>
<style lang="scss" scoped>
 .space_release {
        color:#333;
        font-size: 12px;
        .header {
            display: flex;
            align-items: center;
            // justify-content: space-between;
            height:80px;
            border-bottom:1px solid #F1F1F1;
            .el-breadcrumb {
                padding-left: 20px;
            }
        }
        .upload {
            margin-left: 30px;
            .up_distance {
                margin: 25px 0 15px 0;
            }
            .up-litter {
                // border:1px solid red;
                display:flex;
                align-items:center;
                .up-left {
                    display:inline-block;
                    width:106px;
                    .up-left-title {
                        margin-top:20px;
                        text-align:center;
                    }
                }
                .up-notice {
                    padding:0 50px;
                }
            }
        }
        .left-distance {
            margin-right:20px;
            .topic {
                padding: 10px;
            }
        }
        .el-button.is-round {
            width:120px;
            font-size: 12px;
        }
        .up_button {
            width:500px;
            // border:1px solid red;
            padding:10px 0 100px 0;
            display:flex;
            justify-content:space-between;
        }
        .pay {
            width:106px;
            height:44px;
            border:1px solid #D8D8D8;
            text-align:center;
            line-height:44px;
            border-radius: 4px;
        }
       .show_pay {
           border: 1px solid #4776E7;
       }
       .registration_form {
           margin: 5px 0;
       }
       .continue_to_add {
           color:#4776E7;
           margin-top:10px;
       }
       .is-text {
           background-color: #4776E7;
       }
    }
</style>
